<?php
declare(strict_types=1);

namespace App\TCP;

use App\GlobalData;

class CloseHandler
{
    public function handle(\Swoole\Server $server, int $fd): void
    {
        echo "Client: Close.\n";
        // 无权限的
        if (in_array(strval($fd), GlobalData::getMap()['wait_cons']->keys())) {
            unset(GlobalData::getMap()['wait_cons'][$fd]);
            return;
        }
        // 有权限的


    }
}